package com.loveprogrammer.eternity.model.game;

import com.loveprogrammer.eternity.model.Monster;

import java.io.Serializable;

/**
 * @version 1.0.0
 * @description: 宠物封装
 * @author: eric
 * @date: 2022-08-08 16:39
 **/
public class PetWrapper implements Serializable,Comparable<PetWrapper> {

    /**
     * 是否被使用
     **/
    private Boolean used = false;

    /**
     * 是否在战场
     **/
    private Boolean inBattle = false;

    /**
     * 是否在挂机
     **/

    /**
     * 宠物
     **/
    private Monster pet;

    public PetWrapper(Monster hatch) {
        this.pet = hatch;
    }

    public PetWrapper(Boolean used, Boolean inBattle, Monster pet) {
        this.used = used;
        this.inBattle = inBattle;
        this.pet = pet;
    }

    public Boolean getUsed() {
        return used;
    }

    public void setUsed(Boolean used) {
        this.used = used;
    }

    public Boolean getInBattle() {
        return inBattle;
    }

    public void setInBattle(Boolean inBattle) {
        this.inBattle = inBattle;
    }

    public Monster getPet() {
        return pet;
    }

    public void setPet(Monster pet) {
        this.pet = pet;
    }


    @Override
    public int compareTo(PetWrapper compare) {
        return this.getPet().getTemplate().getQuality()-compare.getPet().getTemplate().getQuality();
    }
}
